<?php
/**
 * Created by PhpStorm.
 * User: 12133
 * Date: 2022/12/5
 * Time: 17:13
 */

namespace app\model\app;


use app\model\sys\SysUser;
use app\model\tb\TbUser;
use think\Model;

class AppLoanOrder extends Model
{
    public function user(){
        return $this->hasOne(TbUser::class,'user_id','user_id');
    }
    public function basic(){
        return $this->hasOne(AppUserBasic::class,'user_id','user_id');
    }
    public function kefu(){
        return $this->hasOne(SysUser::class,'user_id','kefu_id');
    }

    public function payOrder(){
        return $this->hasMany(AppPayOrder::class,'order_id','id')
            ->order('id DESC');
    }
}